import {Button, Grid} from "@material-ui/core";
import {Domain, DriveEta, Person, Phone, Room} from "@material-ui/icons";
import * as React from "react";
import {Link} from "react-router-dom";
//
// addr:"成都市一环路南一段22号",
//     introduction:"这是一个医院的简单介绍",
//     max:3000,
//     parkingLot:300,
//     phone:13778024492,
//     top:["科室1","科室2","科室3"]

const HospitalInfo = ({itemClick, detail,id}: any) => {
    const {addr,top,introduction,max,parkingLot,phone} = detail;
    return <Grid item={true} xs={12} onClick={itemClick}>
        <div>
            <Domain className={"icon-font"}/>
            医院特色科室：{top.join("、")}
        </div>
        <div className={"padding-h"}>
            医院简介：<br/>
            {introduction}
        </div>
        <p>
            <Person className={"icon-font"}/>
            日最大病人接待量：{max}
        </p>
        <p>
            <Room className={"icon-font"}/>
            {addr}
        </p>
        <p>
            <Phone className={"icon-font"}/>
            {phone}
        </p>
        <p>
            <DriveEta className={"icon-font"}/>
            医院停车位： {parkingLot}个
        </p>
        <Link to={{
            pathname: "/depart/list",
            state:{
                id
            }
        }} className={"none-link"}>
            <Button variant="contained" color="primary" className={""} style={{"width": "100%"}}>
                查看科室
            </Button>
        </Link>
    </Grid>;
};

export default HospitalInfo;